package com.maxmlr.dubbo.client;

import com.maxmlr.dubbo.api.TestService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestController
 * @Description TODO
 * @Author maxiao
 * @Date 2020/4/7 下午3:16
 * @Version V1.0
 */
@RestController
@RequestMapping("test")
public class TestController {

    @Reference
    private TestService testService;

    @GetMapping("/{str}")
    public String test(@PathVariable("str") String str) {
        System.out.println("test:----" + str);
        return testService.test(str);
    }
}
